package com.hd.pzhwlxt.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "online_message")
public class OnlineMessage {
    /**
     * 编号
     */
    @TableId(value = "message_id",type = IdType.AUTO)
    private Integer messageId;

    /**
     * 电话
     */
    @TableField(value = "telephone")
    private String telephone;

    /**
     * 机构
     */
    @TableField(value = "mechanism")
    private String mechanism;

    /**
     * 邮箱
     */
    @TableField(value = "mail")
    private String mail;

    /**
     * 主题
     */
    @TableField(value = "theme")
    private String theme;

    /**
     * 内容
     */
    @TableField(value = "text")
    private String text;

    /**
     * 时间
     */
    @TableField(value = "time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;
}
